<!DOCTYPE html>
<html lang="zh" dir="ltr">

<head>
    <meta charset="utf-8">
    <title>登录</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="//cdnhhmk.oss-cn-shenzhen.aliyuncs.com/libs/admin.index.css">
    <link rel="stylesheet" href="//cdnhhmk.oss-cn-shenzhen.aliyuncs.com/libs/admin.reset.css">
    <link rel="stylesheet" href="//cdnhhmk.oss-cn-shenzhen.aliyuncs.com/libs/admin.reset99.css">

       <style>
        html,
        body {
            height: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
        }

        .container {
            width: 100%;
            height: 100%;
            background: url('assets/login_bg.jpg') center center no-repeat;
            background-size: 100% 100%;
        }

    </style>
</head>

<body>
    <div id="app" class="container" flex="main:center cross:center">
        <el-login-panel :title="title" :logo-url="logoUrl" :account-field="accountField" :password-field="passwordField" :button-active="buttonActive" :button-text="buttonText" @submit="handleLogin"></el-login-panel>
        <img src="http://file.ihealthcoming.com/activity_detail_4.png" alt="">
    </div>
</body>
<script src="common/config.js"></script>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
<script>window.jQuery||document.write('<script src="//cdn.staticfile.org/jquery/3.1.1/jquery.min.js"><\/script>')</script>
<script src="testdata/test_data.js"></script>
<script src="//cdnhhmk.oss-cn-shenzhen.aliyuncs.com/libs/admin.index.js"></script>
<script src="//cdnhhmk.oss-cn-shenzhen.aliyuncs.com/libs/admin.common.js"></script>
<script>
    new Vue({
        el: '#app',
        data: function() {
            return {
                title: '欢迎使用悦健康商家后台',
                buttonActive: true,
                logoUrl:'',
                accountField: {
                    name: 'account',
                    placeholder: '用户名',
                    regex: '[0-9]{11}',
                    regexMsg: '用户名必须为手机号',
                    required: true,
                    requiredMsg: '用户名不能为空'
                },
                passwordField: {
                    name: 'password',
                    placeholder: '密码',
                    regex: '[0-9a-z]{6,12}',
                    regexMsg: '密码必须为6~12个字母或数字',
                    required: true,
                    requiredMsg: '密码不能为空'
                },
                buttonText: '登录'
            }
        },
        methods: {
            handleLogin(data) {
                throw new Error('上报一个错误试试看');
                window.location.href = 'artboard.html'
            }
        },
        mounted(){
             $.ajax({
             type: "POST",
             url: "https://server.ihealthcoming.com/Rest/",
             data: {method: 'webchatActivityPgcInfo', activityId:3160},
             dataType: "json",
             success: function(data){
                        console.log(JSON.stringify(data))
                      }
         });
        }
    })

</script>

</html>
